<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>demo</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">

    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/statics/css/font-awesome.min.css">
    <link rel="stylesheet" href="/common/css/cyType.css">
    <link rel="stylesheet" href="/common/css/cyStyle.css">

    <script src="/statics/libs/jquery-1.10.2.min.js"></script>

    <script src="/layuiadmin/layui/layui.all.js" charset="utf-8"></script>
    <script src="/common/js/whole/setting.js"></script>
    <script src="/common/js/whole/utils.js"></script>
    <script src="/common/js/whole/function.js"></script>
    <script src="/common/js/whole/cyLayer.js"></script>
    <script src="/common/js/whole/reg.js"></script>
    <script src="/common/js/whole/common.js"></script>
    <script src="/common/js/whole/fn.js"></script>
    <!--组件-->
    <script src="/common/js/form/cy.select.js"></script>

</head>
<body style="background-color: white;height: 100px;" class="layui-form">
<blockquote class="layui-elem-quote">使用详解 <a class="a-link" href="http://blog.cymall.xin/blog/details/6"  target="_blank">http://blog.cymall.xin</a></blockquote>


<div id="test" cyType="select" cyProps="enumName:'ElementTypeEnum',name:'menuId',value:'1',required:false,filter:'menuFilter',disabled:false,tips:'请选择'"

     class="layui-input-normal"></div>


<span class="layui-btn" onclick="setValue()">动态设值</span>
<span class="layui-btn" onclick="getValue()">获取值</span>
<span class="layui-btn" onclick="render()">方法渲染</span>
<br>

<br>
<br>


<div id="test2"   cyType="select" class="layui-input-normal"></div>


<script>
    function render(){
        $("#test2").render({
            enumName:'StateEnum',
            value:'0',
            disabled:'1'
        });
    }

    function setValue() {
        $("#test").setValue("textarea");
    }
    function getValue() {
        Alert.alert(JSON.stringify($("#test").getValue()));
    }
</script>
</body>
</html>